﻿using System;
using System.Collections.Generic;
using System.Text;

namespace UtilZ.Dotnet.Ex.Communication.Net.Web
{
    /// <summary>
    /// api方法返回值基类
    /// </summary>
    public abstract class ApiActionResultAbs : IApiActionResult
    {

        /// <summary>
        /// 构造函数
        /// </summary>
        public ApiActionResultAbs()
        {

        }

        /// <summary>
        /// 设置响应值
        /// </summary>
        /// <param name="request">http请求</param>
        /// <param name="response">http响应</param>
        public void SetResponse(HttpRequest request, HttpResponse response)
        {
            this.PrimitiveSetResponse(request, response);
        }

        /// <summary>
        /// 设置响应值
        /// </summary>
        /// <param name="request">http请求</param>
        /// <param name="response">http响应</param>
        protected abstract void PrimitiveSetResponse(HttpRequest request, HttpResponse response);
    }
}
